package com.zhang.zxx.boot.trans;


import com.github.annotation.Trans;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * DbTrans:数据库翻译注解(简化注解)
 *
 * @author zhangxiaoxiang
 * @since 2025/1/30
 */

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@Trans(using = DeptTransRepository.class)
public @interface DbTrans {
    /**
     * VO住建字段,如id,userId,deptId
     */

    String trans();

    /**
     * 目标属性,如userName,deptName
     */
    String key() default "";

    /**
     * 数据库目标class[如果有BaseEntity也可以 > 继承 BaseEntity]
     */
    Class<?> entity();

}
